<template>
  <div class="controls">
    <!-- <van-sticky style="width:100%;">
      <van-nav-bar :title="$route.meta.title" style="width:100%;" />
    </van-sticky> -->
    <van-grid :column-num="2" :border="false">
      <van-grid-item :icon="require('@/assets/control/sb.png')" text="设备管理" to="/facility" v-if="utype==0" />
      <van-grid-item :icon="require('@/assets/control/sp.png')" text="商品管理" to="/goods" />
      <van-grid-item :icon="require('@/assets/control/zj.png')" text="商品质检" to="/testing" v-if="utype!=1" />
      <!-- <van-grid-item :icon="require('@/assets/control/ky.png')" text="客源管理" to="/customer" /> -->
      <van-grid-item :icon="require('@/assets/control/report.png')" text="财务数据" v-if="utype!=1" to="/financeA" />
      <van-grid-item :icon="require('@/assets/control/report.png')" text="收款记录" v-if="utype==1" to="/reportsB" />
      <van-grid-item :icon="require('@/assets/control/revenue.png')" text="经营报表" v-if="utype==1" to="/revenuesB" />
    </van-grid>
    <TabBar :curr="2" />
  </div>
</template>

<script>
import TabBar from "@/components/TabBar";
export default {
  name: 'Controls',
  data () {
    return {
      utype: '',
    }
  },
  created () {
    this.utype = JSON.parse(localStorage.getItem("userInfo")).user.utype
  },
  components: {
    TabBar
  },
}
</script>

<style lang="less" scoped>
.controls {
  display: flex;
  flex-direction: column;
  height: 100%;
  /deep/.van-icon__image {
    width: 130px;
    height: 130px;
  }
  /deep/.van-grid-item__text {
    font-size: 30px;
    font-weight: bold;
    margin-top: 24px;
  }
}
</style>